Show:

Q badge Class

Add little badge to one or multiple corners of tool element

Constructor

Q badge

(
  • options
)
Q.Tool

Parameters:

  • options Object

    Override various options for this tool

    • [tl] String optional

      settings for top left badge. If == null - badge remove.

      • [icon] String optional
        Badge icon. Can be "{{Q}}/img/..." or "../img/...". If icon=null - badge remove.
      • [size=options.size] String optional
        Badge width.
      • [top=0] String optional
        Badge top position.
      • [left=0] String optional
        Badge left position.
      • [right] String optional
        Badge right position. if defined - left position ignored.
      • [bottom] String optional
        Badge bottom position. if defined - top position ignored.
      • [font-size] String optional
        Badge content font size.
      • [content] String optional
        Badge content.
      • [onClick] String optional
        Badge click event handler.
      • [className] String optional
        Name of class to add to element
      • [display] String optional
        css "display" style for corner element.
      • [onCreate] Q.Event optional
        Event executed every time badge element created. Get tool as context and badge element, corner, style as arguments.
    • [tr] String optional

      settings for top right badge. If == null - badge remove.

      • [icon] String optional
        Badge icon. Can be "{{Q}}/img/..." or "../img/...". If icon=null - badge remove.
      • [size=options.size] String optional
        Badge width.
      • [top=0] String optional
        Badge top position.
      • [right=0] String optional
        Badge right position.
      • [left] String optional
        Badge left position. if defined - right position ignored.
      • [bottom] String optional
        Badge bottom position. if defined - top position ignored.
      • [font-size] String optional
        Badge content font size.
      • [content] String optional
        Badge content.
      • [onClick] String optional
        Badge click event handler.
      • [className] String optional
        Name of class to add to element
      • [display] String optional
        css "display" style for corner element.
      • [onCreate] Q.Event optional
        Event executed every time badge element created. Get tool as context and badge element, corner, style as arguments.
    • [br] String optional

      settings for bottom right badge. If == null - badge remove.

      • [icon] String optional
        Badge icon. Can be "{{Q}}/img/..." or "../img/...". If icon=null - badge remove.
      • [size=options.size] String optional
        Badge width.
      • [right=0] String optional
        Badge right position.
      • [bottom=0] String optional
        Badge bottom position.
      • [left] String optional
        Badge left position. if defined - right position ignored.
      • [top] String optional
        Badge top position. if defined - bottom position ignored.
      • [font-size] String optional
        Badge content font size.
      • [content] String optional
        Badge content.
      • [onClick] String optional
        Badge click event handler.
      • [className] String optional
        Name of class to add to element
      • [display] String optional
        css "display" style for corner element.
      • [onCreate] Q.Event optional
        Event executed every time badge element created. Get tool as context and badge element, corner, style as arguments.
    • [bl] String optional

      settings for bottom left badge

      • [icon] String optional
        Badge icon. Can be "{{Q}}/img/..." or "../img/...". If icon=null - badge remove.
      • [size=options.size] String optional
        Badge width.
      • [bottom=0] String optional
        Badge bottom position.
      • [left=0] String optional
        Badge left position.
      • [right] String optional
        Badge right position. if defined - left position ignored.
      • [top] String optional
        Badge top position. if defined - bottom position ignored.
      • [font-size] String optional
        Badge content font size.
      • [content] String optional
        Badge content.
      • [onClick] String optional
        Badge click event handler.
      • [className] String optional
        Name of class to add to element
      • [display] String optional
        css "display" style for corner element.
      • [onCreate] Q.Event optional
        Event executed every time badge element created. Get tool as context and badge element, corner, style as arguments.
    • [size="15px"] String optional

      Default badge size.

Returns:

Item Index

Methods

Methods

zoomer

(
  • [options]
)

Zoomer tool Generates an image and zooms it

Parameters:

  • [options] Object optional

    this object contains properties for function

    • [overlayWidth] Number optional

      Image Overlay Width

    • [overlayHeight] Number optional

      Image Overlay Height

    • [leftMargin] Number optional

      Image left margin

    • [rightMargin] Number optional

      Image right Margin

    • [topMargin] Number optional

      Image top Margin

    • [bottomMargin] Number optional

      Image bottom Margin

    • [zoomedWidth] Number optional

      Zooming width

    • [zoomedHeight] Number optional

      Zooming height

    • [widthRatio] Number optional

      Ratio for width on zooming

    • [heightRatio] Number optional

      Ratio for height on zooming

    • [overlayClass] String optional

      Class for Overlay styles